package com.ymatou.iapi.productsnapshot.service;

import com.ymatou.iapi.productsnapshot.parameter.SnapshotOriginList;
import com.ymt.base.YmatouBaseCall;
import com.ymt.core.tool.FormatUtil;
import com.ymttest.utils.EnvSetup;
/**
*根据商品ID和开始结束时间获取快照Call
*FreeMaker Template自动生成代码
*/
public class GetProductSnapshotListByTimeCall extends YmatouBaseCall{
	private static String opurl ="api/Product/GetProductSnapshotListByTime";
	
	public GetProductSnapshotListByTimeCall() {
		super(EnvSetup.getSystemUrl("productsnapshot"),opurl,"POST","JSON");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	
    public SnapshotOriginList getSnapshotOriginList()
    {
    	SnapshotOriginList data = null;
        try {
            data = (SnapshotOriginList) FormatUtil.GSONToObject(getString("data"), SnapshotOriginList.class);

        } catch (Exception e) {
            e.printStackTrace();
        }
        return data;
    }
}